hotplug: Avoid race condition when creating or destroying network bridges
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 13:16:35 +0000 (13:16 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 13:16:35 +0000 (13:16 +0000)
commitf1ad4b4ad79e5c3db55fc12826ab19983b03b2e7
tree1b9fb4b14f7e6164d629d0cfb7492efb517c3e42
parente03337ee2469d695322bc1b77f5af751c13a0486
hotplug: Avoid race condition when creating or destroying network bridges

I saw the following message when I created or destroyed two bridges by
using network-bridge script at same time.  Of course names of the
bridges are different.  But, a temporal name "tmpbridge" is used by
the script to create or destroy the bridges.  I think that the message
was shown by "tmpbridge".

  SIOCSIFNAME: File exists

This patch avoids race condition when creating or destroying the
bridges.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/hotplug/Linux/network-bridge